﻿using System;
using Microsoft.AspNetCore.Mvc;
using System.Xml.Linq;
using VegetableSale.NET.Entities;
using VegetableSale.NET.Services;

namespace VegetableSale.NET.Controllers;

[ApiController]
[Route("api/[Action]")]
public class SaleController : Controller
{
    private RtsaleService rtsaleService = new RtsaleService();

    [HttpPost(Name = "/rtsalelist")]
    public Result rtsalelist([FromBody] QueryDTO queryDTO)
    {
        return rtsaleService.getRtsaleList(queryDTO);
    }

    [HttpPost(Name = "rtsaleaddrtsale")]
    public Result rtsaleaddrtsale(RtsaleQuery rtsaleQuery)
    {
        return rtsaleService.addRtsale(rtsaleQuery);
    }
    
}

